1 /*
2 
3 Boost Software License - Version 1.0 - August 17th, 2003
4 
5 Permission is hereby granted, free of charge, to any person or organization
6 obtaining a copy of the software and accompanying documentation covered by
7 this license (the "Software") to use, reproduce, display, distribute,
8 execute, and transmit the Software, and to prepare derivative works of the
9 Software, and to permit third-parties to whom the Software is furnished to
10 do so, all subject to the following:
11 
12 The copyright notices in the Software and this entire statement, including
13 the above license grant, this restriction and the following disclaimer,
14 must be included in all copies of the Software, in whole or in part, and
15 all derivative works of the Software, unless such copies or derivative
16 works are solely in the form of machine-executable object code generated by
17 a source language processor.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
22 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
23 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
24 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 DEALINGS IN THE SOFTWARE.
26 
27 */ 
28 
29 module derelict.purple.core;
30 
31 import derelict.glib.gtypes;
32 import derelict.glib.glibconfig;
33 import derelict.glib.ghash;
34 
35 extern (C):
36 
37 alias _Anonymous_0 PurpleCoreUiOps;
38 
39 struct _Anonymous_0
40 {
41 	void function () ui_prefs_init;
42 	void function () debug_ui_init;
43 	void function () ui_init;
44 	void function () quit;
45 	GHashTable* function () get_ui_info;
46 	void function () _purple_reserved1;
47 	void function () _purple_reserved2;
48 	void function () _purple_reserved3;
49 }
50 
51 struct PurpleCore;
52 
53 
54 version(Derelict_Link_Static)
55 {
56     extern( C ) nothrow 
57     {
58         gboolean purple_core_init(const(char)* ui);
59         void purple_core_quit();
60         gboolean purple_core_quit_cb(gpointer unused);
61         const(char)* purple_core_get_version();
62         const(char)* purple_core_get_ui();
63         PurpleCore* purple_get_core();
64         void purple_core_set_ui_ops(PurpleCoreUiOps* ops);
65         PurpleCoreUiOps* purple_core_get_ui_ops();
66         gboolean purple_core_migrate();
67         gboolean purple_core_ensure_single_instance();
68         GHashTable* purple_core_get_ui_info();
69     }
70 }
71 else
72 {
73     extern( C ) nothrow 
74     {
75         alias da_purple_core_init = gboolean function(const(char)* ui);					
76         alias da_purple_core_quit = void function();									
77         alias da_purple_core_quit_cb = gboolean function(gpointer unused);				
78         alias da_purple_core_get_version = const(char)* function();						
79         alias da_purple_core_get_ui = const(char)* function();							
80         alias da_purple_get_core = PurpleCore* function();								
81         alias da_purple_core_set_ui_ops = void function(PurpleCoreUiOps* ops);			
82         alias da_purple_core_get_ui_ops = PurpleCoreUiOps* function();					
83         alias da_purple_core_migrate = gboolean function();								
84         alias da_purple_core_ensure_single_instance = gboolean function();				
85         alias da_purple_core_get_ui_info = GHashTable* function();			
86     }
87 
88     __gshared
89     {
90 	    da_purple_core_init purple_core_init;
91 	    da_purple_core_quit purple_core_quit;
92 	    da_purple_core_quit_cb purple_core_quit_cb;
93 	    da_purple_core_get_version purple_core_get_version;
94 	    da_purple_core_get_ui purple_core_get_ui;
95 	    da_purple_get_core purple_get_core;
96 	    da_purple_core_set_ui_ops purple_core_set_ui_ops;
97 	    da_purple_core_get_ui_ops purple_core_get_ui_ops;
98 	    da_purple_core_migrate purple_core_migrate;
99 	    da_purple_core_ensure_single_instance purple_core_ensure_single_instance;
100 	    da_purple_core_get_ui_info purple_core_get_ui_info;
101     }
102 }